const cloud = require('wx-server-sdk')
const db = cloud.database()
const _ = db.command

exports.main = async (event,context)=>{
	let mediaid = event.mediaid;
	let result = await db.collection("base_info").where({
		media_ids: _.exists(true),
		media_ids: _.elemMatch(_.eq(mediaid))
	}).get()
	console.log(result);
	return {'msg':'ok','data':result.data}
}